import React from 'react'
import { Button } from 'antd'
import NewsPublish from '@components/SandBox/Publish/NewsPublish'
import usePublish from '@components/SandBox/Publish/usePublish'

export default function Unpublished() {
  // 自定义hook
  const { dataSource, handlePublish } = usePublish(1)
  return (
    <NewsPublish dataSource={dataSource} button={(id) => <Button type="primary" onClick={() => handlePublish(id)}> 发布 </Button>} />
  )
}
